<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

<h:head> <title>Add a Transportation Mean</title></h:head>
<h:body>
	<h:form>
	<p:menubar>  
        <p:submenu label="Package Section" >  
            <p:menuitem value="Create Package" url="packageInsertion.xhtml" />  
            <p:menuitem value="All Packages" url="package.xhtml" />  
        </p:submenu>  
  
        <p:submenu label="Hotel Section" >  
            <p:menuitem value="Add Hotel" url="hotelInsert.xhtml" />  
            <p:menuitem value="All Hotel" url="hotel.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Transportation Section" >  
            <p:menuitem value="Add Transportation" url="transportationInsert.xhtml" />  
            <p:menuitem value="All Transportation" url="transportationMean.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Excursion Section" >  
            <p:menuitem value="Add Excursion" url="excursionInsert.xhtml" />  
            <p:menuitem value="All Excursion" url="excursion.xhtml" />  
        </p:submenu>  
  
       <f:facet name="options">   
       		<p:commandButton value="Check OutDated Package" action="#{CheckInvalid.checkAll()}"/>
            <p:commandButton value="Logout" action="#{LoginManaged.logout()}"/>
       </f:facet>
    </p:menubar> 
    </h:form>
    <p:panel> 
    <h:form>
		<h:panelGrid columns="3">
			<p:outputLabel>Name</p:outputLabel>
			<p:inputText id="name" value="#{insertTransport.tDTO.name}" />
			<p:message for="name"></p:message>
			<p:outputLabel>Available Places</p:outputLabel>
			<p:inputText id="avl" value="#{insertTransport.tDTO.availablePlaces}" />
			<p:message for="avl"></p:message>
			<p:outputLabel>Type</p:outputLabel>
			<p:inputText id="type" value="#{insertTransport.tDTO.type}" />
			<p:message for="type"></p:message>
			<p:outputLabel>Company</p:outputLabel>
			<p:inputText id="company" value="#{insertTransport.tDTO.company}" />
			<p:message for="company"></p:message>
			<p:outputLabel>Price</p:outputLabel>
			<p:inputText id="price" value="#{insertTransport.tDTO.price}" />
			<p:message for="price"></p:message>
			<p:outputLabel>Departure Place</p:outputLabel>
			<p:inputText id="dep_place" value="#{insertTransport.tDTO.departurePlace}" />
			<p:message for="dep_place"></p:message>
			<p:outputLabel>Arrival Place</p:outputLabel>
			<p:inputText id="arr_place" value="#{insertTransport.tDTO.arrivalPlace}" />
			<p:message for="arr_place"></p:message>
			<p:outputLabel>Departure Date</p:outputLabel>
			<p:calendar id="dep_date" value="#{insertTransport.tDTO.departureDate}" pattern="MM/dd/yyyy HH:mm" />
			<p:message for="dep_date" />
			<p:outputLabel>Arrival Date</p:outputLabel>
			<p:calendar id="arr_date" value="#{insertTransport.tDTO.arrivalDate}" pattern="MM/dd/yyyy HH:mm" />
			<p:message for="arr_date" />
			<f:facet name="footer">
				<p:commandButton action="#{insertTransport.insert}" value="Insert data" ajax="false"/>
			</f:facet>
		</h:panelGrid>
		<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" /> 
</h:form>
</p:panel>
</h:body>
</html>